Note: This statement is not available in the Add Statement dialog box or the Statements pane.
Returns values from a JSONArray as a user array.
Syntax
GetAllValues()
Supported objects
Return value
| Value | Description |
|---|---|
| Value | User array with values from a JSONArray. |
Example
jsonArray = JSONNewArray()
' Appends 1 and 2 to end of array
jsonArray.Push(1)
jsonArray.Push(2)
' Appends 3 to end of array
jsonArray.SetValue(2, 3)
' Sets first index in array to -1
jsonArray.SetValue(0, -1)
' Returns 3 and removes last index from array
intVal = jsonArray.Pop()
PrintLn("Should be 3: " & intVal)
' Returns array with -1 and 2 in it
arrayVal = jsonArray.GetAllValues()
PrintLn("Should be 2: " & ArraySize(arrayVal, 1))
PrintLn("Should be -1: " & arrayVal(1))
PrintLn("Should be 2: " & arrayVal(2))